{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import gym\n",
    "import numpy as np\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "[2018-02-19 23:18:09,195] Making new env: Breakout-v0\n"
     ]
    }
   ],
   "source": [
    "env = gym.envs.make(\"Breakout-v0\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Action space size: 4\n",
      "Observation space shape: (210, 160, 3)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANEAAAD8CAYAAADpCEEHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAADm1JREFUeJzt3X/sVfV9x/Hna1j9g3YBqyNGcKCjXXDZqCWObGq6uVokTdH9YTFLpZsZmmjSRpcFa7KZJU22rmDSbLPBSIqL9UdHrWaxVsaammXDCpYiqChYjHyDMHURh00t8N4f5/Ndj1++l+/93ve5vedeX4/k5p77Ob8+J35ffs45nPu+igjMrHe/MugOmA07h8gsySEyS3KIzJIcIrMkh8gsqW8hkrRM0h5JeyWt6dd+zAZN/fh3IkkzgBeBTwIHgKeBayPiucZ3ZjZg/RqJLgb2RsTLEfEu8ACwok/7Mhuo0/q03XOBV2ufDwC/22lhSX5swtro9Yg4e6qF+hWiKUlaDawe1P7NuvBKNwv1K0RjwLza57ml7f9FxHpgPXgksuHWr2uip4GFkhZIOh1YCTzap32ZDVRfRqKIOCbpZuB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Z9AhehpYKGmBpNOBlVSFToaGpJmSPjQ+DVwB7KJzIZdhMVKFaCZct11N9d8IquNZKekMSQuoKvf+cFobb8GdlOXAi1R3RW4fdH966P/5VHd3fgzsHj8GOhRyaeMLuJ/qFOfnVNcE13fqPz0UomnJ8fxz6e/OEpxzasvfXo5nD3DldPfnJxbMkgZ9Omc29BwisySHyCzJITJLcojMkhwisySHyCzJITJL+j+3QFvlMGmcOgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fa3143d3dd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANEAAAD8CAYAAADpCEEHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAADm1JREFUeJzt3X/sVfV9x/Hna1j9g3YRqyMGcKKjXXDZqCWObGq6uVokTdH9YTFLpZsZmkjSRpcFa7KZJU22rmLSbKPBSIqL9UdnrWSxFsaammXDCpbiTxQpRr5BmLiow6YWeO+P8/muxy/fy/d+7/vc3nMvr0dyc8/9nF+fE78vP+cczn1fRQRm1rtfGXQHzIadQ2SW5BCZJTlEZkkOkVmSQ2SW1LcQSVoqabekPZLW9Gs/ZoOmfvw7kaQZwEvAJ4H9wFPAdRHxfOM7Mxuwfo1ElwB7ImJvRLwHPAAs79O+zAbqtD5tdw7wWu3zfuB3Oy0syY9NWBu9ERHnTLVQv0I0JUmrgFWD2r9ZF17tZqF+hWgMmFf7PLe0/b+IWA+sB49ENtz6dU30FLBA0nxJpwMrgE192pfZQPVlJIqIo5JWA98DZgAbIuK5fuzLbND6cot72p1o4enc2rVrp73OLbfcktrGxPWb2kZWG/ow0cQ+9WmfOyJi8VQL+YkFs6SB3Z0bNv0YJQYx2jXhlzHSDBO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GOhRyaeMLuJ/qFOfnVNcEN3TqPz0UomnJ8fxz6e+uEpxza8vfXo5nN3DVdPfnJxbMkgZ9Omc29BwisySHyCzJITJLcojMkhwisySHyCzJITJL+j9/YFvl22l9KAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fa2f183f590>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print(\"Action space size: {}\".format(env.action_space.n))\n",
    "\n",
    "observation = env.reset()\n",
    "print(\"Observation space shape: {}\".format(observation.shape))\n",
    "\n",
    "plt.figure()\n",
    "plt.imshow(env.render(mode='rgb_array'))\n",
    "\n",
    "[env.step(2) for x in range(1)]\n",
    "plt.figure()\n",
    "plt.imshow(env.render(mode='rgb_array'))\n",
    "\n",
    "env.render(close=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7f67210cce50>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQUAAAD8CAYAAAB+fLH0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAADu5JREFUeJzt3X/sXXV9x/Hna0Vw1h9txTUdrbZq58LMMpqGddMZIxsWxqjLjKkx81cTsgw3XV20yB/6j4nMTafJhqnChguCzB+xMchgiDOLaxWQ34jUKvJtWqqi4GARK+/9cU/d/dR+afu999z7/bLnI/nmnl/3nPc99/t99ZxzT+87VYUkHfJL0y5A0vxiKEhqGAqSGoaCpIahIKlhKEhq9BYKSTYmuSfJ7iTb+tqOpPFKH/cpJFkEfBP4A2AG+Brw2qq6a+wbkzRW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NJciFwELi8m7QPeG5VnQZsBT6R5Jk9ljCx92HaobAXWDU0vrKbNhFJnsIgEC6vqs8AVNUDVfWzqnoc+CgjHoodi6ra2z0eAD7bbfOBQ4fF3eOBvuvonAXcXFUPdDVNfH90Znv9E/+dSfJG4BzgdV1A0R2u/6AbvonBufyv9VXDE7wPY98f0w6FrwFrk6zp/oXaDOyYxIaTBLgEuLuqPjA0ffj89I+BOw5/7pjrWJzkGYeGGVzYuoPBfnhDt9gbgM/1WceQ1zJ06jDp/TFktte/A3h99ynEBuChodOMsUuyEXgHcG5VPTo0/TlJFnXDzwfWAnt6rGO292EHsDnJSUnWdHV8daSN9XH19DivtJ7N4Mr/t4ALJ7jdlzI4JL0NuKX7ORv4F+D2bvoOYEXPdTyfwdXjW4E7D+0D4NnA9cC9wL8DyyawTxYDPwCeNTSt9/3BIIT2AT9lcE68ZbbXz+BTh3/ofl9uB9b3XMduBufsh35HPtIt+yfd+3ULcDPwRz3XMev7AFzY7Y97gLNG3b53NEpqTPv0QdI8YyhIahgKkhqGgqSGoSCpYShIahgKkhqGgqTG/wIPZfJqzrI4ggAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f672383bfd0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Check out what a cropped image looks like\n",
    "plt.imshow(observation[34:-16,:,:])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
